package com.blog.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.blog.entity.User;
import com.blog.mapper.UserMapper;
import com.blog.service.UserService;
@Service
public class UserServiceImpl implements UserService {
	//注入UserMapper
	@Autowired
	private UserMapper userMapper;
	
	@Override
	public User login(String username, String password) {
		
		return userMapper.find(username, password);
	}
	/**
	 * 查询用户信息
	 */
	@Override
	public List<User> findUserInfo() {
		
		return userMapper.findUserInfo();
	}
	/**
	 * 修改个人信息
	 */
	@Override
	public void modifyUserInfo(User user) {
		userMapper.modifyUserInfo(user);
		
	}
	/**
	 * 上传头像图片
	 * @return
	 */
	@Override
	public void addUserInfo(User user) {
		userMapper.addUserInfo(user);
	}

}
